package com.hsy.order.order.action

import com.hsy.order.base.data.CommonResult
import com.hsy.order.base.data.ListBean
import com.hsy.order.base.http.BaseResponse
import com.hsy.order.order.data.OrderData
import io.reactivex.Observable
import retrofit2.http.*

/**
 * 首页网路请求
 * Created on 2018/3/26.
 *
 * @author Yang
 */
interface HomeService {
    /**
     * 获取首页数据
     * @param params 参数
     */
    @GET("AppHome/home.html")
    fun getHomeData(@QueryMap params: Map<String, String>): Observable<BaseResponse<ListBean<OrderData>>>

    /**
     * 接收订单
     * @param params 参数
     */
    @POST("AppHome/acceptOrder.html")
    @FormUrlEncoded
    fun acceptOrder(@FieldMap params: Map<String, String>): Observable<BaseResponse<CommonResult>>

    /**
     * 拒接订单
     * @param params 参数
     */
    @POST("AppHome/refusedOrder.html")
    @FormUrlEncoded
    fun refuseOrder(@FieldMap params: Map<String, String>): Observable<BaseResponse<CommonResult>>

    /**
     * 拒接订单
     * @param params 参数
     */
    @POST("AppHome/paidanOrder.html")
    @FormUrlEncoded
    fun dispatchOrder(@FieldMap params: Map<String, String>): Observable<BaseResponse<CommonResult>>
}